/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.navid.trafalgar.mod.windtunnel;

import com.jme3.app.Application;
import com.jme3.system.AppSettings;
import com.navid.trafalgar.manager.GameConfiguration;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.screen.Screen;
import de.lessvoid.nifty.screen.ScreenController;

/**
 *
 * @author alberto
 */
public class PreWindTunnelController implements ScreenController {

    Nifty nifty;
    Screen screen;
    WindTunnelMain game;
    private final Application app;
    private final AppSettings settings;

    public PreWindTunnelController(Application app, AppSettings settings , WindTunnelMain windMain) {
        this.app = app;
        this.settings = settings;
        game = windMain;
    }

    public void bind(Nifty nifty, Screen screen) {
        this.nifty = nifty;
        this.screen = screen;
    }

    public void onStartScreen() {
    }

    public void onEndScreen() {
    }

    public void goTo(String nextScreen) {
        
        GameConfiguration gc = new GameConfiguration();
        gc.setMap("Games/WindTunnel/WindTunnel.json");
        gc.setShowGhost(true);
        game.setGameConfiguration(gc);
        
       
        nifty.gotoScreen(nextScreen);  // switch to another screen
    }
}
